﻿@{
    ViewBag.Title = "Projects";
}
<div id="content-top" class="item-header">
</div>
<div id="main-content">
    <ul class="vertical tabs">
        <li class="first active loaded"><a href="@Url.Action("Summary", "Project")" class="ajax-update-lnk" rel="project-tab"><strong>Summary</strong></a></li>
        <li><a href="@Url.Action("Issues", "Project")" class="ajax-update-lnk" rel="project-tab"><strong>Issues</strong></a></li>
        <li><a href="#" class="ajax-update-lnk" rel="project-tab"><strong>Road Maps</strong></a></li>
        <li><a href="#" class="ajax-update-lnk" rel="project-tab"><strong>Agile</strong></a></li>
        <li><a href="#" class="ajax-update-lnk" rel="project-tab"><strong>Calendar</strong></a></li>
        <li><a href="#" class="ajax-update-lnk" rel="project-tab"><strong>Versions</strong></a></li>
        <li><a href="#" class="ajax-update-lnk" rel="project-tab"><strong>Components</strong></a></li>
        <li><a href="#" class="ajax-update-lnk" rel="project-tab"><strong>Labels</strong></a></li>
    </ul>
    <div id="project-tab" class="active-area">
        @Html.Partial("Summary")
    </div>
</div>

@section footjs
{
<script src="@Url.Content("~/Scripts/highcharts.js")" type="text/javascript"></script>
<script type="text/javascript">
    var chart;
    $(document).ready(function () {
        $.ajax({
            "url": '@Url.Action("DataSet", "Project")',
            "data": "",
            "type": "post",
            "success": function (data) {
                chart = new Highcharts.Chart({
                    chart: {
                        renderTo: 'container',
                        defaultSeriesType: 'line',
                        marginRight: 130,
                        marginBottom: 25
                    },
                    title: {
                        text: null
                    },
                    subtitle: {
                        text: null,
                    },
                    xAxis: {
                        categories: data.categories
                    },
                    yAxis: {
                        title: {
                            text: null
                        }
                    },
                    tooltip: {
                        formatter: function () {
                            return '<b>' + this.series.name + '</b><br/>' +
								this.x + ': ' + this.y + '°C';
                        }
                    },
                    legend: {
                        layout: 'vertical',
                        align: 'right',
                        verticalAlign: 'top',
                        x: -10,
                        y: 100,
                        borderWidth: 0
                    },
                    series: data.series
                });
            },
            "contentType": "application/json",
            "dataType": "json",
            "cache": false,
            "error": function (xhr, error, thrown) {
                if (error == "parsererror") {
                    alert("DataTables warning: JSON data from server could not be parsed. " +
								    "This is caused by a JSON formatting error.");
                }
            }
        });

    });
</script>
}